<jsp:useBean id="actionBean" scope="request" type="net.chowda.castcluster.action.ConfigAction"/>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<script type="text/javascript">
    $(document).ready(configInit);

    function configInit() {
        $('input#save').bind('click', function() {
            var formData = $('div#configEdit//input').serialize();
            $('div#configMessage').html('<img src="<c:url value="/images/small_loading.gif"/>"/> Please wait... ');
            $.post(contextPath + "ajax/EditConfig.action", formData, function(data) {
                $('div#configEdit').html(data);
                $('div#configMessage').html("confguration saved!");
                configInit();
            });
        });
    }
</script>
<div id="configMessage">
    please verify and save this configuration.   
</div>
<br/>
<table bgcolor="#cccccc" cellpadding="5" cellspacing="1">
    <tr bgcolor="white">
        <td nowrap="true" valign="top">
            <strong>ffmpeg path:</strong>
            <br/>
            <input type="text" name="converterBase" value="${actionBean.converterBase}" size="50"/>
        </td>
        <td width="100%">
            This is the fully qualified path to ffmpeg.
            <br/><br/>
            Detailed ffmpeg installation process can be found
            <a href="http://code.google.com/p/castcluster/wiki/ffmpeg">here</a>. (it's not hard)
        </td>
    </tr>
    <tr bgcolor="white">
        <td nowrap="true" valign="top">
            <strong>base url:</strong>
            <br/>
            <input type="text" name="baseUrl" value="${actionBean.baseUrl}" size="50"/>
        </td>
        <td width="100%">
            base url is the address that CastCluster will be available at in your web browser.
            <br/><br/>
            The default of <strong>http://localhost:8080/castcluster</strong> should be good for most users.
            <br/><br/>

            <strong>NOTE:</strong> If you change this setting you will need to restart CastCluster for the changes to
            take effect. You will also need to delete your bookmarklet (if you've already "installed" it) and drag it
            from the main menu to your bookmark toolbar, again.
        </td>
    </tr>
    <tr bgcolor="white">
        <td colspan="3" align="center">
            <input type="button" id="save" name="save" value="save"/>
        </td>
    </tr>
</table>
<br/>
